/*
 Navicat Premium Data Transfer

 Source Server         : docker
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3307
 Source Schema         : hzz_admin

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 23/11/2025 11:04:49
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) DEFAULT NULL COMMENT '用户名',
  `password` varchar(50) DEFAULT NULL COMMENT '密码',
  `salt` varchar(50) DEFAULT NULL COMMENT '密码盐值',
  `email` varchar(50) DEFAULT '' COMMENT '邮箱',
  `phone` varchar(50) DEFAULT '' COMMENT '手机号',
  `avatar` varchar(255) DEFAULT '' COMMENT '头像',
  `type` enum('user','admin','supplier_admin') DEFAULT 'user' COMMENT '类型：user => 普通用户，admin => 管理员，supplier_admin => 超级管理员',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  `is_delete` tinyint(4) DEFAULT '0' COMMENT '是否删除 1 => 是 0 => 否',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='管理用户表';

-- ----------------------------
-- Records of admin
-- ----------------------------
BEGIN;
INSERT INTO `admin` (`id`, `username`, `password`, `salt`, `email`, `phone`, `avatar`, `type`, `create_time`, `update_time`, `delete_time`, `is_delete`) VALUES (1, 'supplier_admin', 'f5548a3e4a2cde0659238faa43e533e9', '692278608bbcc', 'pu9ggq.g6c63@21cn.com', '18996671406', NULL, 'supplier_admin', 1763819108, 1763866720, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for admin_role
-- ----------------------------
DROP TABLE IF EXISTS `admin_role`;
CREATE TABLE `admin_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL COMMENT '角色id',
  `admin_id` int(11) DEFAULT NULL COMMENT '管理用户id',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理员角色表';

-- ----------------------------
-- Records of admin_role
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auths
-- ----------------------------
DROP TABLE IF EXISTS `auths`;
CREATE TABLE `auths` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL COMMENT '角色id',
  `menu_id` int(11) DEFAULT NULL COMMENT '菜单id',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色菜单表';

-- ----------------------------
-- Records of auths
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for department
-- ----------------------------
DROP TABLE IF EXISTS `department`;
CREATE TABLE `department` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '部门名称',
  `code` varchar(50) DEFAULT NULL COMMENT '部门编号',
  `pid` int(11) DEFAULT NULL COMMENT '上级部门ID',
  `sort` int(11) DEFAULT '0' COMMENT '排序',
  `is_delete` tinyint(4) DEFAULT '0' COMMENT '是否删除：0-否 1-是',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COMMENT='部门表';

-- ----------------------------
-- Records of department
-- ----------------------------
BEGIN;
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (1, '龙腾集团', 'bloc', 0, 0, 0, NULL, 1763804368, 1763804368);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (2, '上海分公司', 'Shanghai', 1, 0, 0, NULL, 1763804395, 1763804395);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (3, '杭州分公司', 'Hangzhou', 1, 0, 0, NULL, 1763804416, 1763804416);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (4, '技术部', 'IT', 2, 0, 0, NULL, 1763804440, 1763804440);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (5, '后端组', 'back-end', 4, 0, 0, NULL, 1763804494, 1763804494);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (6, '前段组', 'front-end', 4, 0, 0, NULL, 1763804546, 1763804546);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (7, 'php', 'php', 5, 0, 0, NULL, 1763804594, 1763804594);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (8, 'golang', 'golang', 5, 0, 0, NULL, 1763804613, 1763804613);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (9, 'vue', 'vue', 6, 0, 0, NULL, 1763804656, 1763804656);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (10, 'react', 'react', 6, 0, 0, NULL, 1763804685, 1763804685);
INSERT INTO `department` (`id`, `name`, `code`, `pid`, `sort`, `is_delete`, `delete_time`, `create_time`, `update_time`) VALUES (11, 'python', 'python', 5, 0, 0, NULL, 1763805603, 1763805614);
COMMIT;

-- ----------------------------
-- Table structure for department_manager
-- ----------------------------
DROP TABLE IF EXISTS `department_manager`;
CREATE TABLE `department_manager` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `department_id` int(11) DEFAULT NULL COMMENT '部门ID',
  `leader_name` varchar(255) DEFAULT NULL COMMENT '负责人姓名',
  `leader_phone` varchar(255) DEFAULT '' COMMENT '负责人手机号',
  `leader_email` varchar(255) DEFAULT '' COMMENT '负责人邮箱',
  `leader_type` enum('CEO','GENERAL_MANAGER','DIRECTOR','MANAGER','TEAM_LEAD') DEFAULT 'MANAGER' COMMENT '负责人角色 CEO => 总裁 GENERAL_MANAGER => 总经理 DIRECTOR => 总监 MANAGER => 经理 TEAM_LEAD => 团队主管',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `is_delete` tinyint(4) DEFAULT '0' COMMENT '是否删除 1是 0否',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='部门负责人表';

-- ----------------------------
-- Records of department_manager
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for development
-- ----------------------------
DROP TABLE IF EXISTS `development`;
CREATE TABLE `development` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `sex` tinyint(4) DEFAULT '0' COMMENT '性别：0-未知 1-男 2-女',
  `real_name` varchar(30) DEFAULT '' COMMENT '真实姓名',
  `position` varchar(30) DEFAULT '' COMMENT '职位',
  `description` varchar(255) DEFAULT NULL COMMENT '描述',
  `status` int(11) DEFAULT '1' COMMENT '状态',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `is_delete` tinyint(4) DEFAULT '0' COMMENT '是否删除：0-否 1-是',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='技术部成员表';

-- ----------------------------
-- Records of development
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(80) DEFAULT NULL COMMENT '名称',
  `pid` int(11) DEFAULT NULL COMMENT 'pid',
  `icon` varchar(30) DEFAULT NULL COMMENT '图标',
  `url` varchar(100) DEFAULT NULL COMMENT '路径',
  `status` tinyint(4) DEFAULT '1' COMMENT '路径',
  `sort` tinyint(4) DEFAULT '0' COMMENT '路径',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COMMENT='菜单表';

-- ----------------------------
-- Records of menu
-- ----------------------------
BEGIN;
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (1, '仪表盘', 0, 'AntDesignDashboardOutlined', '/dashboard', 1, 100, 1762593761, 1762593761);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (2, '管理账户', 0, 'AntDesignUserOutlined', '/admin', 1, 99, 1762593788, 1762593788);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (3, '角色管理', 0, 'AntDesignUsergroupAddOutlined', '/role', 1, 98, 1762593809, 1762593809);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (4, '菜单管理', 0, 'AntDesignMenuOutlined', '/menu', 1, 97, 1762593835, 1762593835);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (5, '数据统计', 0, 'AntDesignBarChartOutlined', '/statistics', 1, 96, 1762593860, 1762593860);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (6, '系统设置', 0, 'AntDesignSettingOutlined', '/settings', 1, 95, 1762593890, 1762593890);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (7, '部门管理', 0, 'AntDesignClusterOutlined', '/department', 1, 0, 1762603806, 1762603806);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (8, '技术部', 7, 'AntDesignDesktopOutlined', '/development', 1, 0, 1762603910, 1762603910);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (9, '销售部', 7, 'AntDesignShopOutlined', '/sales', 1, 0, 1762604027, 1762604027);
INSERT INTO `menu` (`id`, `name`, `pid`, `icon`, `url`, `status`, `sort`, `create_time`, `update_time`) VALUES (11, '部门列表', 7, 'AntDesignClusterOutlined', '/index', 1, 0, 1763642133, 1763642133);
COMMIT;

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE `migrations` (
  `version` bigint(20) NOT NULL,
  `migration_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `breakpoint` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of migrations
-- ----------------------------
BEGIN;
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251030125107, 'CreateRoleTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251030125134, 'CreateAdminTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251101060705, 'CreateAdminRoleTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251101060937, 'CreateAuthsTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251101061038, 'CreateMenuTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251116120008, 'CreateDevelopmentTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251121082309, 'CreateDepartmentTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
INSERT INTO `migrations` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES (20251122120121, 'CreateDepartmentManagerTable', '2025-11-22 21:37:00', '2025-11-22 21:37:00', 0);
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '角色名称',
  `description` varchar(255) DEFAULT NULL COMMENT '角色描述',
  `status` int(11) DEFAULT '1' COMMENT '状态 0:禁用 1:正常',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  `is_delete` tinyint(4) DEFAULT '0' COMMENT '是否删除 1 => 是 0 => 否',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='角色表';

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` (`id`, `name`, `description`, `status`, `create_time`, `update_time`, `delete_time`, `is_delete`) VALUES (1, 'supplier_admin', '超级管理员', 1, 1763866978, 1763866978, NULL, 0);
INSERT INTO `role` (`id`, `name`, `description`, `status`, `create_time`, `update_time`, `delete_time`, `is_delete`) VALUES (2, 'admin', '管理员', 1, 1763866997, 1763866997, NULL, 0);
INSERT INTO `role` (`id`, `name`, `description`, `status`, `create_time`, `update_time`, `delete_time`, `is_delete`) VALUES (3, '11', '11', 1, 1763867014, 1763867014, 1763867018, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
